package customer.zspt.cn.customer.activitys;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.widget.Toast;

import customer.zspt.cn.customer.InterfacePg.IGetNetState;
public abstract class BaseActivity extends FragmentActivity implements IGetNetState{
    /**网络状态发生改变*/
    public static IGetNetState state;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getResoultLayout());
        initView();
        initListener();
        initData();
        state = this;
    }
    /*** 获取布局文件*/
    public abstract int getResoultLayout();
    /** 设置控件*/
    public abstract void initView();
    /** 设置监听器*/
    public abstract void initListener();
    /** 设置数据*/
    public abstract void initData();

    /**显示toast*/
    public void showToast(String msg){
        Toast.makeText(this,msg, Toast.LENGTH_SHORT).show();
    }
}
